package gang.org.springframework.boot.autoconfigure.web.servlet;

import gang.org.springframework.boot.web.embedded.tomcat.GangTomcatConnectorCustomizer;
import gang.org.springframework.boot.web.embedded.tomcat.GangTomcatContextCustomizer;
import gang.org.springframework.boot.web.embedded.tomcat.GangTomcatProtocolHandlerCustomizer;
import gang.org.springframework.boot.web.embedded.tomcat.GangTomcatServletWebServerFactory;
import gang.org.springframework.framework.annotation.GBean;
import gang.org.springframework.framework.annotation.GConfiguration;
import gang.org.springframework.framework.beans.factory.GangObjectProvider;

/**
 * @Author：gang.chen
 * @Date：2023/8/7 18:02
 */
@GConfiguration
public class GangServletWebServerFactoryConfiguration {

    //Tomcat
    @GConfiguration
    public static class EmbeddedTomcat
    {
        @GBean
        public GangTomcatServletWebServerFactory tomcatServletWebServerFactory(
                GangObjectProvider<GangTomcatConnectorCustomizer> connectorCustomizers,
                GangObjectProvider<GangTomcatContextCustomizer> contextCustomizers,
                GangObjectProvider<GangTomcatProtocolHandlerCustomizer> protocolHandlerCustomizers)
        {
            GangTomcatServletWebServerFactory factory = new GangTomcatServletWebServerFactory();

            return factory;
        }

    }

    //Jetty TODO


    //Undertow TODO
}
